-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn StrategyParameters.NodeResourceUtilizationThresholds field into a pointer #240
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@seanmalloy any chance this change makes it into v0.10.0? Or are we past that point?
go.mod
Outdated
@@ -5,6 +5,7 @@ go 1.13 | |||
require ( | |||
github.com/spf13/cobra v0.0.5 | |||
github.com/spf13/pflag v1.0.5 | |||
gopkg.in/yaml.v2 v2.2.8 // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any idea where this came from? says it's indirect but just curious which of these changes might have brought it in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know the answer to this question. I did compile this code using Go 1.13.6 and can confirm that the go.mod
and go.sum
files are clean. I also verified go mod tidy
and it is good.
@damemi it is too late for v0.10.0. The tag has already been created https://github.com/kubernetes-sigs/descheduler/releases/tag/v0.10.0. |
/assign @aveshagarwal @ravisantoshgudimetla |
/kind bug |
@aveshagarwal and @ravisantoshgudimetla please take a look at this when you have some time. |
0a3e2ac
to
e1616a3
Compare
…a pointer The field is intended to be omitempty when not set. Without a pointer the strategy serialized into json string looks like: ```json strategies: LowNodeUtilization: enabled: true params: nodeResourceUtilizationThresholds: numberOfNodes: 1 targetThresholds: cpu: 50 memory: 50 pods: 20 thresholds: cpu: 50 memory: 50 pods: 20 RemoveDuplicates: enabled: true params: nodeResourceUtilizationThresholds: {} RemovePodsViolatingInterPodAntiAffinity: enabled: true params: nodeResourceUtilizationThresholds: {} RemovePodsViolatingNodeAffinity: enabled: true params: nodeAffinityType: - requiredDuringSchedulingIgnoredDuringExecution nodeResourceUtilizationThresholds: {} RemovePodsViolatingNodeTaints: enabled: true params: nodeResourceUtilizationThresholds: {} ``` It's preferred to have the following json string instead: ``` strategies: LowNodeUtilization: enabled: true params: nodeResourceUtilizationThresholds: numberOfNodes: 1 targetThresholds: cpu: 50 memory: 50 pods: 20 thresholds: cpu: 50 memory: 50 pods: 20 RemoveDuplicates: enabled: true RemovePodsViolatingInterPodAntiAffinity: enabled: true RemovePodsViolatingNodeAffinity: enabled: true params: nodeAffinityType: - requiredDuringSchedulingIgnoredDuringExecution RemovePodsViolatingNodeTaints: enabled: true ```
e1616a3
to
991eddb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ingvagabund, ravisantoshgudimetla The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
To resurrect this, do you think we should do the same with the |
Yeah, given the Strategy data type is shared among all strategies, more pointers, the better!!! |
…-params-NodeResourceUtilizationThresholds-field-into-pointer Turn StrategyParameters.NodeResourceUtilizationThresholds field into a pointer
The field is intended to be omitempty when not set. Without a pointer the strategy
serialized into json string looks like:
It's preferred to have the following json string instead:
This effectively changes the exported data type so any user importing
StrategyParameters
data type and setting/readingNodeResourceUtilizationThresholds
field will need to adjust affected code.